import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

import './assets/fonts/iconfont.css'
import axios from 'axios'
// 面包屑导航
import breadcrumb from "./components/Breadcrumb"
Vue.component("breadcrumb",breadcrumb)
// 设置基准地址
axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1'

// 配置axios的请求拦截器
axios.interceptors.request.use(config => {
  // 请求之前添加统一的token令牌
  config.headers['Authorization'] = sessionStorage.token;
  return config;
})
// 将axios挂载到vue的原型上
Vue.prototype.axios = axios


Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')